<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="toTop" content="true">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" href="./Public/Home/css/cata.css" />
<style type="text/css">
	    	#page{
	    		float: right;
	    		margin-right: 20px;
	    		list-style: none;
	    		height: 30px;
	    	}
	    </style>
<!--头部公用部分载入-->
{{include file="VIEW_PATH/Common/header.php"}}
<!-- 轮播图开始 -->
{{foreach from="$comdata" key="$k" value="$v"}}
{{if value="$k==0" }}
<div id="scroll">
	<div style="margin-left: -260px;">
        <a href=""><img width="1609px" style="overflow: hidden;" src="./Public/Home/img/{{$v['type_tid']}}.jpg" alt="" /></a>
    </div>
</div>
{{endif}}
{{endforeach}}
<!-- 轮播图结束 -->

<script type="text/javascript">
	$(function(){
		var b="{{U('Cata/index',array('cid'=>$_GET['cid'],'bid'=>Q('get.bid',0,'intval')))}}";

		$('.mrpxx').attr('href',b);
		$('.jgpxx').click(function(){
			$(this).attr('href',b+'&o=1');
		})
		$('.jgpxx1').click(function(){
			$(this).attr('href',b+'&o=2');
		})
		$('.jgpxx2').click(function(){
			$(this).attr('href',b+'&o=3');
		})
		
	})
</script>


<!--主题区域开始-->
<div id="sort">
	<ul class="sortname">
		<li><a href="" class="mrpxx">默认排序</a></li>
		<li><a class="jgpxx" href="">价格<span></span></a></li>
		<li><a class="jgpxx1" href="">销量<span></span></a></li>
		<li><a class="jgpxx2" href="">新品<span></span></a></li>
	</ul>
</div>
<!--筛选开始-->
<div id="attr-box">
			<div class="attr">
				<ul>
					{{if value="!empty($bdata)"}}
					<li class="attr-border">
						<h3>品牌:</h3>
						<ul class="attr-content" style="width: 1080px;">
							<li>
								<a href="{{U('Cata/index',array('cid'=>$_GET['cid'],'bid'=>0))}}"{{if value="$bid eq 0"}}class="hover"{{endif}}>不限</a>
							</li>
                            {{foreach from="$bdata" value="$v"}}
							<li>
								<a href="{{U('Cata/index',array('cid'=>$_GET['cid'],'bid'=>$v['bid']))}}"{{if value="$bid eq $v['bid']"}}class="hover"{{endif}}>{{$v['bname']}}</a>
							</li>
							{{endforeach}}
						</ul>
					</li>
					{{endif}}
					
					{{foreach from="$goodsAttr" key="$k" value="$v"}}
					<li class="attr-border">
						<h3>{{$v['name']}}:</h3>
						<ul class="attr-content" style="width: 1080px;">
							<?php 
								$temp = $param;
								$temp[$k] = 0;
							?>
							<li>
								<a href="{{U('Cata/index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp),'bid'=>Q('get.bid',0,'intval')))}}" {{if value="$param[$k] eq 0"}}class="hover"{{endif}} >不限</a>
							</li>
                            {{foreach from="$v['value']" value="$value"}}
							<?php 
								$temp[$k] = $value['sid'];
							?>
							<li>
								<a href="{{U('Cata/index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp),'bid'=>Q('get.bid',0,'intval')))}}"  {{if value="$param[$k] eq $value['sid']"}}class="hover"{{endif}}>{{$value['sability']}}</a>
							</li>
							{{endforeach}}
						</ul>
					</li>
					{{endforeach}}
					
				</ul>
			</div>
		</div>
<!--筛选结束-->
{{if value="empty($comdata)"}}
<div style="width: 1190px;margin: 0 auto;">
	<p style="margin: 50px auto; font-size: 30px; padding-left: 360px;">该筛选没有商品，请重新筛选！！！</p>
</div>
{{else}}
<div class="sortcate">
    {{foreach from="$comdata" value="$v"}}
	<div class="sortcate1">
		<div class="catetu"><a href="{{U('List/index',array('cmid'=>$v['cmid']))}}"><img style="width: 220px; height: 220px;" src="{{$v['columnplot']}}"/></a></div>
		<div class="sortcate2">
		   <a class="catezi" href="{{U('List/index',array('cmid'=>$v['cmid']))}}">{{$v['cmname']}}</a>
		   <span class="caterate">￥ {{$v['sptprice']}}</span>
	    </div>
	    <div class="ment">
	    	<a class="mentzi" href="javescritp::">发现优奇</a>
	    </div>
	</div>
    {{endforeach}}
</div>
{{endif}}

        <div id="page" style="clear: both;" >
			<div class="pagination">{{$page}}</div>
		</div>
<!--主题区域结束-->

<div style="clear: both;"></div>
	
</div>
<!--调用尾部公用-->
{{include file="VIEW_PATH/Common/end.php"}}

</body>
</html>
